from mpl_toolkits.mplot3d import Axes3D
import numpy as np
from matplotlib import pyplot as plt
from decimal import Decimal

fig = plt.figure()
ax = Axes3D(fig)


cheng_zhang_list=[]
for i in range(1200,1270,10):
    cheng_zhang_list.append(i)


zizhi_list=[]
for i in range(1000,1600,10):
    zizhi_list.append(i)
cheng_zhang, zizhi = np.meshgrid(cheng_zhang_list, zizhi_list)  # 网格的创建，这个是关键
#Z = Decimal(14)*Decimal(zizhi)+Decimal(10)*Decimal(zizhi)*Decimal(cheng_zhang_list)
Z = 14*zizhi+10*zizhi*cheng_zhang
plt.xlabel('x')
plt.ylabel('y')
ax.plot_surface(cheng_zhang, zizhi, Z, rstride=1, cstride=1, cmap='rainbow')
plt.show()